<template>
  <el-card class="box-card">
    <div>
      <el-input class="input" v-model="input" placeholder="用户名"></el-input>
      <el-button type="primary" :icon="Search" @click="search">查询</el-button>
      <el-button type="default" @click="resetSearch">清空</el-button>
    </div>


    <div style="margin: 20px 0">
      <el-button type="primary" @click="showAddUser">添 加</el-button>
      <el-button type="danger" @click="revomveUsers" >批量删除</el-button>
    </div>

    <el-table
      :data="tableData"
      style="width: 100%"
      border>
      <el-table-column
        type="selection"
        width="55" >
      </el-table-column>
      <el-table-column
        prop="date"
        label="序号"
        width="180"
      type="index">
      </el-table-column>
      <el-table-column
        prop="date"
        label="用户名"
        width="180">
      </el-table-column>
      <el-table-column
        prop="name"
        label="用户昵称"
        width="180">
      </el-table-column>
      <el-table-column
        prop="address"
        label="用户列表">
      </el-table-column>
      <el-table-column
        prop="address"
        label="创建时间">
      </el-table-column>
      <el-table-column
        prop="address"
        label="更新时间">
      </el-table-column>
      <el-table-column
        prop="address"
        label="操作">
      </el-table-column>

    </el-table>



  </el-card>
</template>


<script lang="ts">

  import {reqUserManagementList} from "../../../api/product/user";

  export default {
    name: 'User',
    data() {
      return {
        tableData: [{
          date: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-04',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1517 弄'
        }, {
          date: '2016-05-01',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1519 弄'
        }, {
          date: '2016-05-03',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1516 弄'
        }]
      }
    },
    methods:{
      getReqUserManagementList(){
        reqUserManagementList();
      }
    },
    mounted() {
      this.getReqUserManagementList();
    }
  };
</script>


<style scoped>
  .text {
    font-size: 14px;
  }

  .item {
    padding: 18px 0;
  }

  .box-card {
    margin-top: 20px;
    margin-left: 20px;
    width: 97%;
  }
  .input{
    width: 180px;
    margin-right: 10px;
  }
</style>
